home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #3
/
Amiga Plus CD - 2002 - No. 03.iso
/
AmiSoft
/
Dev
/
Mui
/
Mcc_speedbar.lha
/
MCC_SpeedBar
/
Developer
/
C
/
Examples
/
barclass.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-12-21
|
2KB
|
104 lines
#include <proto/exec.h>
#include <proto/utility.h>
#include <proto/muimaster.h>
#include <clib/alib_protos.h>
#include <mui/SpeedBar_mcc.h>
#include <mui/muiundoc.h>
#include <string.h>
/***********************************************************************/
#define STDARGS __stdargs
#define SAVEDS __saveds
#define ASM __asm
#define REG(x) register __ ## x
#define nfset(obj,attr,value) SetAttrs(obj,MUIA_Group_Forward,FALSE,attr,value,TAG_DONE)
/***********************************************************************/
/*
** Bar Class definitions
*/
#define _TAG(x) ((int)0xfec0000+10+x)
/* Methods */
enum
{
MUIM_Bar_Set = _TAG(0),
MUIM_Bar_Notify,
MUIM_Bar_Disable,
MUIM_Bar_Active,
};
struct MUIP_Bar_Set
{
ULONG MethodID;
ULONG button;
ULONG tag;
ULONG value;
ULONG remember;
};
struct MUIP_Bar_Notify
{
ULONG MethodID;
ULONG button;
ULONG trigAttr;
ULONG trigVal;
APTR destObj;
ULONG followParams;
/* ... */
};
struct MUIP_Bar_Disable
{
ULONG MethodID;
ULONG disable;
};
struct MUIP_Bar_Active
{
ULONG MethodID;
ULONG button;
};
/* Attributes */
enum
{
MUIA_Bar_Buttons = _TAG(0),
MUIA_Bar_Active,
};
struct SBButton
{
STRPTR file;
STRPTR text;
STRPTR help;
UWORD flags;
ULONG exclude;
};
enum
{
MUIV_Button_Flags_Disabled = 1<<0,
MUIV_Button_Flags_Hide = 1<<1,
MUIV_Button_Flags_Toggle = 1<<2,
MUIV_Button_Flags_Selected = 1<<3,
MUIV_Button_Flags_Space = 1<<4,
};
#define SBENTRY(file,text,help,flags,exclude) {(STRPTR)(file),(STRPTR)(text),(STRPTR)(help),(UWORD)(flags),(ULONG)(exclude)}
#define SBBUTTON(file,text,help) SBENTRY(file,text,help,0,0)
#define SBSPACER SBENTRY(MUIV_SpeedBar_Spacer,0,0,0,0)
#define SBEND SBENTRY(MUIV_SpeedBar_End,0,0,0,0)
/***********************************************************************/
BOOL ASM createBarClass ( REG (a0 )struct MUI_CustomClass **class );
void ASM deleteBarClass ( REG (a0 )struct MUI_CustomClass **class );
/***********************************************************************/